import * as React from 'react';

const Home = React.lazy(() => import('../views/home'))
const City = React.lazy(() => import('../views/city'))
const Detail = React.lazy(() => import('../views/detail'))
const Login = React.lazy(() => import('../views/login'))
const MainLayout = React.lazy(() => import('../views/mainLayout'))
const Register = React.lazy(() => import('../views/register'))
const User = React.lazy(() => import('../views/user'))

export const routes = [{
  path: '/',
  element: <MainLayout></MainLayout>,
  children: [{
    path: '/',
    element: <Home></Home>
  },{
    path: '/user',
    element: <User></User>
  }]
},{
  path: '/city',
  element: <City></City>
},{
  path: '/detail/:id',
  element: <Detail></Detail>
},{
  path: '/login',
  element: <Login></Login>
},{
  path: '/register',
  element: <Register></Register>
}]
